using UnityEngine;

namespace NL.Advanced
{
    public static class BoundsExtension
    {
        public static Vector3 GETMax(this Bounds who, Transform owner)
        {
            Vector3 p1 = who.min;
            Vector3 p2 = who.max;

            p1 = owner.TransformPoint(p1);
            p2 = owner.TransformPoint(p2);

            return Vector3.Max(p1, p2);
        }
        public static Vector3 GETMin(this Bounds who, Transform owner)
        {
            Vector3 p1 = who.min;
            Vector3 p2 = who.max;

            p1 = owner.TransformPoint(p1);
            p2 = owner.TransformPoint(p2);

            return Vector3.Min(p1, p2);
        }
    }
}